{% extends 'base.html' %}

{% load i18n highlight  %}

{% block title %}{% blocktrans %}Search: {{ query }}{% endblocktrans %}{% endblock %}

{% block content %}
        <!-- BEGIN search form -->
        <div class="wide-search-bar">
          <div class="wide-search-bar-wrapper clearfix">
            <form action="." method="GET">
              <div class="text-input-wrapper">
                <input type="text" name="q" value="{{ query }}" id="id_site_search">
              </div>
              <div class="submit-input-wrapper">
                {% comment %}Translators: This is about starting a search{% endcomment %}
                <input type="submit" value="{% trans "Go crazy." %}">
              </div>
            </form>
          </div>
        </div>
        <!-- END search form -->


        {% if query %}
        <!-- BEGIN search results -->
        <div class="module">
          <div class="module-wrapper">

            <div class="module-header">
              <h3>{% blocktrans %}Results for {{ query }}{% endblocktrans %}</h3>
            </div>

            <div class="module-list">
              <div class="module-list-wrapper">

                <ul>
					{% include 'search/base_search.html' %}
                </ul>

              </div>
            </div>

          </div>
        </div>
        <!-- END search results -->

          {% if page.has_previous or page.has_next %}
          <!-- BEGIN search pagination -->
          <div class="pagination">
            {% if page.has_previous %}
              <a href="?q={{ query }}&amp;page={{ page.previous_page_number }}">&laquo; {% trans "Previous" %}</a>
            {% else %}
              <span class="disabled">&laquo; {% trans "Previous" %}</span>
            {% endif %}

            {% if page.has_next %}
              <a class="next" href="?q={{ query }}&amp;page={{ page.next_page_number }}">{% trans "Next" %} &raquo;</a>
            {% else %}
              <span class="next disabled">{% trans "Next" %} &raquo;</span>
            {% endif %}
          </div>
          <!-- END search pagination -->
          {% endif %}

        {% else %}
          {# Show some example queries to run, maybe query syntax, something else? #}
        {% endif %}

{% endblock %}
